﻿using Wicresoft.SelfService.DAL;


namespace Wicresoft.SelfService.WebService
{
    public class UpdateServiceRecords : IUpdateServiceRecords
    {
        private static WorkListDAL workList;
        public UpdateServiceRecords()
        {
            if (workList == null) workList = new WorkListDAL();
        }
        public int updateRequestStatus(string requestID, string status)
        {
            return workList.UpdateServiceRecordsStatus(requestID, status);  
        }
        public int updateRequestApprover(string requestID, string approver)
        {
            return workList.UpdateServiceRecordsApprover(requestID, approver);
        }
        public int updateSelfServiceRequest(UpdateParam param,out string sql)
        {
            return workList.UpdateServiceRecords(param.RequestID, param.Status, param.Approver, param.IncidentNumber, out sql);
        }
    }
}